package com.zfei.gfb.api.domain;

import java.io.Serializable;
import java.util.Objects;

/**
 * 统计值
 *
 * @author fgh
 */
public class StatsValue implements Serializable {

    /**
     * 统计ID
     */
    private String id;

    /**
     * 统计标签
     */
    private String tag;

    /**
     * 统计数量
     */
    private Long num;

    public StatsValue() {
        num = 0L;
    }

    public StatsValue(String id, String tag, long num) {
        this.id = id;
        this.tag = tag;
        this.num = num;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public long getNum() {
        return num;
    }

    public void setNum(long num) {
        this.num = num;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StatsValue that = (StatsValue) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(tag, that.tag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, tag);
    }
}
